Description
Theme resets to flexoki every time the TUI starts. Save the selected theme index to a local state file so the last-used theme is restored on next launch.
State file location: ~/.local/share/dashboard/tui_state.json (create dir if needed).
Implementation:
- On
action_next_theme(), write{"theme_idx": N, "page_id": "..."}to the state file - On
on_mount(), read the file if it exists and restore_theme_idxbefore applying the theme - Use
json+pathlib.Path; silently ignore missing or malformed state file - A single state file shared with TASK-022 (page persistence)
Acceptance Criteria
- #1 Selected theme persists after quitting and relaunching the TUI
- #2 Missing or corrupt state file falls back to flexoki without error
- #3 State file is human-readable JSON